cmake_minimum_required(VERSION 3.0)

project(lr_vo1)

set(CMAKE_BUILD_TYPE "Release")
add_definitions("-DENABLE_SSE")
set(CMAKE_CXX_FLAGS "-std=c++14 -O2 ${SSE_FLAGS} -msse4")
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})

find_package(OpenCV REQUIRED)
find_package(G2O REQUIRED)
find_package(Sophus REQUIRED)
find_package(Gflags REQUIRED)
find_package(Glog REQUIRED)
include_directories(${GFLAGS_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS})

include_directories(
        ${EIGEN3_INCLUDE_DIR}
        ${OpenCV_INCLUDE_DIRS}
        ${G2O_INCLUDE_DIRS}
        ${Sophus_INCLUDE_DIRS}
)


add_executable(lr_vo1 triangulation.cpp)

target_link_libraries(lr_vo1
   g2o_core g2o_stuff ${OpenCV_LIBS} ${Sophus_LIBRARIES} fmt
   ${GFLAGS_LIBRARIES} ${GLOG_LIBRARIES}
)

install(TARGETS lr_vo1 RUNTIME DESTINATION bin)
